package com.kun.admin.authority.model;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by likun on 2017/1/17.
 * 菜单/权限 列表,分级
 */
public class MenuItem implements Serializable {
    /**
     * 菜单权限id
     */
    private Long id;

    /**
     * 菜单/权限名字
     */
    private String name;

    /**
     * 资源链接
     */
    private String url;

    /**
     * 类型:0菜单,1资源
     */
    private Integer type;

    /**
     * 等级
     */
    private Integer lvl;

    /**
     * 图标icon的class
     */
    private String icon;

    /**
     * 父类菜单id
     */
    private Long prentId;

    /**
     * 子 菜单/权限
     */
    private ArrayList<MenuItem> children;

    /**
     * 菜单对应的前端组件名称
     */
    private String component;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url.replace("\r\n","\n");
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getLvl() {
        return lvl;
    }

    public void setLvl(Integer lvl) {
        this.lvl = lvl;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Long getPrentId() {
        return prentId;
    }

    public void setPrentId(Long prentId) {
        this.prentId = prentId;
    }

    public ArrayList<MenuItem> getChildren() {
        return children;
    }

    public void setChildren(ArrayList<MenuItem> children) {
        this.children = children;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }
}
